//
//  DLRecordTool.h
//  DGGAudioVideoPlayerSDK
//
//  Created by wumingpeng on 2020/2/06.
//  Copyright © 2020年 apple. All rights reserved.
//
#import <Foundation/Foundation.h>
@class AVAudioPlayer;
@class AVAudioRecorder;

@interface DLRecordTool : NSObject

/// 录音工具的单例
+ (instancetype)sharedRecordTool;

/// 开始录音
- (void)startRecording;

/// 停止录音
- (void)stopRecording;

/// 播放录音文件
- (void)playRecordingFile;

/// 停止播放录音文件
- (void)stopPlaying;

/// 停止播放回调
@property (nonatomic, copy)void(^didStopPlayCallBack)(void);

/// 销毁录音文件
- (void)destructionRecordingFile;

/// 录音文件路径
- (NSString *)recordFilePath;

///销毁timer
- (void)invalidateTimer;

///录音文件地址
@property (nonatomic, strong) NSURL *recordFileUrl;

/// 录音对象
@property (nonatomic, strong) AVAudioRecorder *recorder;

/// 播放器对象
@property (nonatomic, strong) AVAudioPlayer *player;

/// 更新图片回调
@property (nonatomic, copy) void(^updateImageCallBack) (DLRecordTool *tool, NSInteger startRecord);

@end
